package com.zhc.dejingapi.controller;


import com.zhc.dejingapi.entity.QingSfcmoroutingshiftEntity;
import com.zhc.dejingapi.entity.vo.InfoVo;
import com.zhc.dejingapi.entity.vo.WaterBoilTaskVo;
import com.zhc.dejingapi.service.IQingSfcmoroutingshiftService;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhc
 * @since 2024-08-07
 */
@RestController
@RequestMapping("/qingsfc")
@CrossOrigin
public class QingSfcmoroutingshiftController {

    //@Resource
    private final IQingSfcmoroutingshiftService qingSfcmoroutingshiftService;

    public QingSfcmoroutingshiftController(IQingSfcmoroutingshiftService qingSfcmoroutingshiftService1) {
        this.qingSfcmoroutingshiftService = qingSfcmoroutingshiftService1;
    }

    @PostMapping("/getJobList/{eId}")
    public List<QingSfcmoroutingshiftEntity> getJobList(@PathVariable Long eId){
        return qingSfcmoroutingshiftService.getJobList(eId);
    }

    @PostMapping("/getJob/{mainId}")
    public InfoVo getJob(@PathVariable Long mainId){

        return qingSfcmoroutingshiftService.getInfoById(mainId);
    }

    @PostMapping("/getHouJobList")
    public List<QingSfcmoroutingshiftEntity> getHouJobList(){
        return qingSfcmoroutingshiftService.getHouJobList();
    }

    @PostMapping("/getWaterBoilTask")
    public List<WaterBoilTaskVo> getWaterBoilTask(){
        return qingSfcmoroutingshiftService.getWaterBoilTask();
    }

    @PostMapping("/getTheoreticalOutputMonth")
    public double getTheoreticalOutputMonth(){
        return qingSfcmoroutingshiftService.getTheoreticalOutputMonth();
    }
}
